home *** CD-ROM | disk | FTP | other *** search
- # Jedi Knight Cog Script
- #
- # FORCE_WELL.COG
- #
- # JEDI RANK Script
- # Bin 20
- #
- # The rank of a Jedi determines his mana regeneration rate.
- #
- # [YB]
- #
- # (C) 1997 LucasArts Entertainment Co. All Rights Reserved
-
-
- symbols
-
- thing player local
-
- message startup
- message pulse
-
- flex maximum
-
- end
-
- # ========================================================================================
-
- code
-
- startup:
- player = GetLocalPlayerThing();
-
- // determine the maximum
- maximum = GetInv(player, 20) * 50;
- if (IsMulti())
- {
- if (maximum < jkGetMultiParam(120))
- maximum = jkGetMultiParam(120);
- SetInv(player, 69, maximum);
- }
- else
- SetInv(player, 69, 1000000);
-
- Sleep(1.0);
- SetPulse(1.0);
-
- Return;
-
- # ........................................................................................
-
- pulse:
- // don't do anything if the player is currently dead
- if(GetThingHealth(player) < 1) Return;
-
- if (!IsMulti())
- maximum = GetInv(player, 20) * 50;
-
- ChangeInv(player, 14, maximum / 100);
-
- if(GetInv(player, 14) > maximum)
- SetInv(player, 14, maximum);
-
- Return;
-
- end
-
-
-